-- global scripts for Wrath of the Gods 40 MB demo
on setGlobalStart
set the centerStage to TRUE
set the fixStageSize to TRUE
set the exitLock to TRUE
global list23c, tune33a, blox43a
global SaveMovie, SavePath
global invList, inv1, inv2, inv3, inv4, invCurrent, jumpFrame
global SaveFrame, mode, hScore, currentGems, currentScore
global invWind, invBank, invBanksAll
global altGlobal, playFrom, atOr, onOr, hintCount, invOff, Bri
global cont, saveGlobal
set mode = 5
set hScore = 0
set currentGems = 2
set currentScore = 100
set altGlobal = 0
set playFrom = 0
set atOr = 0
set onOr = 1
set hintCount = 0
set invOff = 0
set Bri = 0
set the text of cast "scoreRap" to string(currentScore)
set invList = "s5a,w26a,l48a"
set invWind = 0
set invBank = 1
set invBanksAll = 1
set inv1 = "s5a"
set inv2 = "w26a"
set inv3 = "l48a"
set inv4 = "iBlank"
set invCurrent = EMPTY
set jumpFrame = EMPTY
set cont = 0
global firstOr, orCount
global o1a
global o3a
global branch5a, lever5a, fulcrum5a, o5a
global fulcrum11c5a, fulcrum61a5a, gotSword5a
global pray6a, snake6a, Peddler6a, o6a
global youngWom7a, oldWom7a, firstTalk7a,¼
firstOldWom7a, necklace7a, o7a, o7a2
global guys9a, branch9a, o9a
global hit10a, o10a
global pond11a, o11a
global avalanche11c, gem11c, rock11c, o11c
global torchGuy12a, dark12a, o12a
global torchGuy14a, hit14a, heads14a, tHeads14a, o14a, o14a2
global o14b
global Hera14c, o14c
global Peddler15a, rap15a, pedPay15a, o15a
global seedbag16a, seedmen16a, bagSee16a, fight16a, o16a, o16a2
global o16b
global o16c, o16c2, o16c3
global o17a
global hit18b, door18b, o18b
global vat18c, oars18c, gem18c, o18c
global upTree19b, downTree19b, o19b
global Sciron20a, o20a
global across20b, o20b
global o20c
global Shade20g, coin20g
global o20i
global first20j, sledge20j, o20j
global o21a
global firstTalk23a, King23a, Queen23a, kingWait23a, o23a, o23a2
global first23b, hit23b, gotSword23b
global oneRock23b, twoRock23b, threeRock23b, fourRock23b, fiveRock23b
global firstBreak23b, secondBreak23b, thirdBreak23b, o23b
global o23c
global lastQt23b
global first24a, o24a
global bees26a, o26a
global offer27a, o27a, o27a2
global o27c
global at28a, gem28a, dest28a, play28a, pilot28a, o28a, o28a2, o28a4
global o29a, fly29a
global tack30a, crash30a, Prow30a, o30a
global useWax31a, o31a
global wine32a, o32a
global die33a, do33a, o33a, o33a2
global o33b
global o34a
global gem35a, firstTalk35a, talk35a, o35a
global break35b, o35b, cave35b
global drunk38a, o38a
global Peddler38c, rap38c, gem38c, o38c
global o39a, in39a
global o42a
global got43a, o43a
global man44a, skip44a, o44a
global Sis45a
global rock45a, o45a
global slab45b, o45b
global Herc46a, o46a
global Pers46b, o46b
global talk46c, staff46c, o46c
global light47a, o47a
global Orpheus48a, o48a
global Theseus49a, o49a
global Cerb50a, o50a
global atm50b, o50b
global slab50c, o50c
global o52a
global first53a, hisClub53a, done53a, o53a
global first56a, at56a, o56a
global first57a, o57a
global o59a
global helmet60a, die60a, eye60a, o60a
global gem60b, o60b
global bridle60e, o60e
global rock61a, wine61a, ointment61a, chart61a
global gem61a, o61a, o61a2
global swim65a, o65a
global talk66a, o66a
global stix66b, o66b
global bird66d, vase66d, o66d
global o66e
global candle67a, o67a
global door68a, o68a
global leap68b, skip68b, o68b
global vases68c, o68c
global Ariadne69a, talk69a, rude69a, o69a
global vases70a, o70a
global o70b
global Dione70d, o70d
global o71a
global at74a, door74a, o74a
global o74b
global Atlas76a, o76a
global Peg78a, o78a
global o78b
global sandals78d, o78d
global blast81a, o81a
global Pan83a, o83a
global o83b
global Ped84a, o84a
global o85a
global reeds85c, string85c, o85c
global Argus86a, o86a
global Caeneus87a, o87a
global Hera87b, o87b
global o87c
global o88a
global o89a
global hit90a, lab90a, gotTack30a, o90a, doom30a, o68a2, add28a, razz76a, noGem32a
global eat89a
Put "list23c,tune33a,blox43a,SaveMovie,SavePath,invList,inv1,inv2,inv3,inv4,invCurrent,jumpFrame," into saveGlobal
Put "SaveFrame,mode,hScore,currentGems,currentScore,invWind,invBank,invBanksAll,cont,firstOr,orCount,o1a,o3a,branch5a,lever5a," after saveGlobal
Put "fulcrum5a,o5a,fulcrum11c5a,fulcrum61a5a,gotSword5a,pray6a,snake6a,Peddler6a,o6a,youngWom7a,oldWom7a,firstTalk7a,firstOldWom7a,necklace7a,o7a,o7a2,guys9a,branch9a,o9a,hit10a,o10a,pond11a,o11a,avalanche11c,gem11c,rock11c,o11c," after saveGlobal
Put "torchGuy12a,dark12a,o12a,torchGuy14a,hit14a,heads14a,tHeads14a,o14a,o14a2,o14b,Hera14c,o14c,Peddler15a,rap15a,pedPay15a,o15a,seedbag16a,seedmen16a,bagSee16a,fight16a,o16a,o16a2,o16b,o16c,o16c2,o16c3,o17a,hit18b,door18b,o18b,vat18c," after saveGlobal
Put "oars18c,gem18c,o18c,upTree19b,downTree19b,o19b,Sciron20a,o20a,across20b,o20b,o20c,Shade20g,coin20g,o20i,first20j,sledge20j,o20j,o21a,firstTalk23a,King23a,Queen23a,kingWait23a,o23a,o23a2,first23b,hit23b,gotSword23b,oneRock23b," after saveGlobal
Put "twoRock23b,threeRock23b,fourRock23b,fiveRock23b,firstBreak23b,secondBreak23b,thirdBreak23b,o23b,o23c,lastQt23b,first24a,o24a,bees26a,o26a,offer27a,o27a,o27a2,o27c,at28a,gem28a,dest28a,play28a,pilot28a,o28a,o28a2,o28a4,o29a," after saveGlobal
Put "fly29a,tack30a,crash30a,Prow30a,o30a,useWax31a,o31a,wine32a,o32a,die33a,do33a,o33a,o33a2,o33b,o34a,gem35a,firstTalk35a,talk35a,o35a,break35b,o35b,cave35b,drunk38a,o38a,Peddler38c,rap38c,gem38c,o38c,o39a,in39a,o42a," after saveGlobal
Put "got43a,o43a,man44a,skip44a,o44a,Sis45a,rock45a,o45a,slab45b,o45b,Herc46a,o46a,Pers46b,o46b,talk46c,staff46c,o46c,light47a,o47a,Orpheus48a,o48a,Theseus49a,o49a,Cerb50a,o50a,atm50b,o50b,slab50c,o50c,o52a,first53a,hisClub53a,done53a," after saveGlobal
Put "o53a,first56a,at56a,o56a,first57a,o57a,o59a,helmet60a,die60a,eye60a,o60a,gem60b,o60b,bridle60e,o60e,rock61a,wine61a,ointment61a,chart61a,gem61a,o61a,o61a2,swim65a,o65a,talk66a,o66a,stix66b,o66b,bird66d,vase66d,o66d,o66e,candle67a," after saveGlobal
Put "o67a,door68a,o68a,leap68b,skip68b,o68b,vases68c,o68c,Ariadne69a,talk69a,rude69a,o69a,vases70a,o70a,o70b,Dione70d,o70d,o71a,at74a,door74a,o74a,o74b,Atlas76a,o76a,Peg78a,o78a,o78b,sandals78d,o78d,blast81a,o81a,Pan83a,o83a,o83b," after saveGlobal
Put "Ped84a,o84a,o85a,reeds85c,string85c,o85c,Argus86a,o86a,Caeneus87a,o87a,Hera87b,o87b,o87c,o88a,o89a,hit90a,lab90a,gotTack30a,o90a,doom30a,o68a2,add28a,razz76a,noGem32a,eat89a,altGlobal,playFrom,atOr,onOr,hintCount,invOff,Bri,end0" after saveGlobal -- òòòòòò replaced Herm90a with gotTack30a, o90a2 with doom30a
set list23c = "0,0,0"
set tune33a = "0,0,0"
set blox43a = "0,0,0,0,0"
set Peddler6a = 0
set youngWom7a = 0
set oldWom7a = 0
set guys9a = 0
set torchGuy12a = 0
set torchGuy14a = 0
set Hera14c = 0
set Peddler15a = 0
set seedmen16a = 0
set Sciron20a = 0
set Shade20g = 0
set King23a = 0
set Queen23a = 0
set Prow30a = 0
set Peddler38c = 0
set man44a = 0
set Sis45a = 0
set Herc46a = 0
set Pers46b = 0
set Orpheus48a = 0
set Theseus49a = 0
set bird66d = 0
set Ariadne69a = 0
set Dione70d = 0
set Atlas76a = 0
set Peg78a = 0
set Pan83a = 0
set Ped84a = 0
set Argus86a = 0
set Caeneus87a = 0
set Hera87b = 0
set gotTack30a = 0
set branch5a = 0
set necklace7a = 0
set branch9a = 0
set gem11c = 0
set rock11c = 0
set vat18c = 0
set oars18c = 0
set gem18c = 0
set tack30a = 0
set gem60b = 0
set bridle60e = 0
set rock61a = 0
set wine61a = 0
set ointment61a = 0
set chart61a = 0
set candle67a = 0
set vases68c = 0
set vases70a = 0
set sandals78d = 0
set fulcrum5a = 0
set lever5a = 0
set pray6a = 0
set snake6a = 0
set fulcrum11c5a = 0
set fulcrum61a5a = 0
set gotSword5a = 0
set firstTalk7a = 0
set firstOldWom7a = 0
set hit10a = 0
set pond11a = 0
set avalanche11c = 0
set dark12a = 0
set hit14a = 0
set heads14a = 0
set tHeads14a = 0
set rap15a = 0
set pedPay15a = 0
set seedbag16a = 0
set bagSee16a = 0
set fight16a = 0
set hit18b = 0
set door18b = 0
set upTree19b = 0
set downTree19b = 0
set across20b = 0
set coin20g = 0
set first20j = 0
set sledge20j = 0
set firstTalk23a = 0
set kingWait23a = 0
set first23b = 0
set hit23b = 0
set gotSword23b = 0
set oneRock23b = 0
set twoRock23b = 0
set threeRock23b = 0
set fourRock23b = 0
set fiveRock23b = 0
set firstBreak23b = 0
set secondBreak23b = 0
set thirdBreak23b = 0
set lastQt23b = 0
set first24a = 0
set bees26a = 0
set offer27a = 0
set at28a = 0
set dest28a = 0
set gem28a = 0
set add28a = 0
set play28a = 0
set pilot28a = 0
set fly29a = 0
set crash30a = 0
set useWax31a = 0
set wine32a = 0
set noGem32a = 0
set die33a = 0
set do33a = 0
set gem35a = 0
set firstTalk35a = 0
set talk35a = 0
set break35b = 0
set cave35b = 0
set drunk38a = 0
set rap38c = 0
set gem38c = 0
set in39a = 0
set got43a = 0
set skip44a = 0
set rock45a = 0
set slab45b = 0
set talk46c = 0
set staff46c = 0
set light47a = 0
set Cerb50a = 0
set atm50b = 0
set slab50c = 0
set first53a = 0
set hisClub53a = 0
set done53a = 0
set first56a = 0
set at56a = 0
set first57a = 0
set helmet60a = 0
set die60a = 0
set eye60a = 0
set gem61a = 0
set swim65a = 0
set talk66a = 0
set stix66b = 0
set vase66d = 0
set door68a = 0
set leap68b = 0
set skip68b = 0
set talk69a = 0
set rude69a = 0
set at74a = 0
set door74a = 0
set razz76a = 0
set blast81a = 0
set reeds85c = 0
set string85c = 0
set eat89a = 0
set lab90a = 0
set hit90a = 0
set firstOr = 0
set orCount = 0
set o1a = 0
set o3a = 0
set o5a = 0
set o6a = 0
set o7a = 0
set o7a2 = 0
set o9a = 0
set o10a = 0
set o11a = 0
set o11c = 0
set o12a = 0
set o14a = 0
set o14a2 = 0
set o14b = 0
set o14c = 0
set o15a = 0
set o16a = 0
set o16a2 = 0
set o16b = 0
set o16c = 0
set o16c2 = 0
set o16c3 = 0
set o17a = 0
set o18b = 0
set o18c = 0
set o19b = 0
set o20a = 0
set o20b = 0
set o20c = 0
set o20i = 0
set o20j = 0
set o21a = 0
set o23a = 0
set o23a2 = 0
set o23b = 0
set o23c = 0
set o24a = 0
set o26a = 0
set o27a = 0
set o27a2 = 0
set o27c = 0
set o28a = 0
set o28a2 = 0
set o28a4 = 0
set o29a = 0
set o30a = 0
set o31a = 0
set o32a = 0
set o33a = 0
set o33a2 = 0
set o33b = 0
set o34a = 0
set o35a = 0
set o35b = 0
set o38a = 0
set o38c = 0
set o39a = 0
set o42a = 0
set o43a = 0
set o44a = 0
set o45a = 0
set o45b = 0
set o46a = 0
set o46b = 0
set o46c = 0
set o47a = 0
set o48a = 0
set o49a = 0
set o50a = 0
set o50b = 0
set o50c = 0
set o52a = 0
set o53a = 0
set o56a = 0
set o57a = 0
set o59a = 0
set o60a = 0
set o60b = 0
set o60e = 0
set o61a = 0
set o61a2 = 0
set o65a = 0
set o66a = 0
set o66b = 0
set o66d = 0
set o66e = 0
set o67a = 0
set o68a = 0
set o68a2 = 0
set o68b = 0
set o68c = 0
set o69a = 0
set o70a = 0
set o70b = 0
set o70d = 0
set o71a = 0
set o74a = 0
set o74b = 0
set o76a = 0
set o78a = 0
set o78b = 0
set o78d = 0
set o81a = 0
set o83a = 0
set o83b = 0
set o84a = 0
set o85a = 0
set o85c = 0
set o86a = 0
set o87a = 0
set o87b = 0
set o87c = 0
set o88a = 0
set o89a = 0
set o90a = 0
set doom30a = 0
when keyDown then keystroke
unload
on setGlobalAll
global mode, invWind, altGlobal
set altGlobal = 0
repeat with x = 19 to 24
puppetSprite x, true
set the immediate of sprite x to true
end repeat
set invWind = 0
set mode = 0
set the castNum of sprite 24 to the number of cast "control0"
cursor 500
sound fadeIn 1, 60
puppetSound "ambience"
when keyDown then keystroke
on controlButton
global mode, invWind, invCurrent, invOff
set x0 = 385
put the mouseH into temp
if (the mouseV < 403) or (the mouseV > 461) or (temp < 381) or (temp > 624) then
exit
else if invOff = 0 then
set invCurrent = EMPTY
set width = 43
if (temp > x0) and (temp < x0 + width) then
set mode = 0
else if (temp > (x0 + width)) and (temp < x0 + (2*width)) then
set mode = 1
else if (temp > (x0 + (2*width))) and (temp < x0 + (3*width)) then
set mode = 2
else if (temp > (x0 + (3*width))) and (temp < x0 + (4*width)) then
set mode = 3
else if (temp > (x0 + (4*width))) and (temp < x0 + (5*width)) then
set mode = 4
else if (temp > (x0 + (5*width))) and (temp < 624) then
set mode = 5
end if
if mode = 4 then
if invWind = 1 then
exit
else if invWind = 0 then
cursor 4
showInventory
end if
else
if invWind = 1 then
killInventory
end if
end if
set the castNum of sprite 24 to the number of cast ("control" & string(mode))
cursor (500 + mode)
updateStage
end if
on keyStroke
global mode, invWind, invCurrent, invOff, playFrom
set kk = the keyCode
if ((the commandDown) and ((kk = 1) or (kk = 31) or (kk = 12)))¼
and (invoff = 0) then
if (kk = 1) then
if mode = 5 or mode = 10 then
saveGame
cursor 200
cursor 0
updateStage
else
set playFrom to the frame
pause
saveGame
sound stop 2
set mode = 0
set the castNum of sprite 24 to the number of cast "control0"
cursor 200
cursor 500
if invWind = 1 then
killInventory
end if
updateStage
continue
go value(playFrom)
exit
end if
else if (kk = 31) then
if mode = 5 or mode = 10 then
loadGame
else
set playFrom to the frame
pause
loadGame
end if
else if (kk = 12) then
doQuitRoutine
end if
exit
end if
if (((kk > 82) and (kk < 87)) or ((kk > 17) and (kk < 23)))¼
and (mode < 5) and (invOff = 0) then
if (kk > 82) and (kk < 87) then
set mode = (kk - 83)
else if (kk > 17) and (kk < 23) then
set mode = (kk - 18)
end if
set invCurrent = EMPTY
if invWind = 1 then
killInventory
end if
set the castNum of sprite 24 to the number of cast ("control" & string(mode))
cursor (500 + mode)
updateStage
else if ((kk = 23) or (kk = 87)) and (mode < 5) and (invOff = 0) then
set mode = 4
if invWind = 1 then
exit
else
showInventory
end if
set the castNum of sprite 24 to the number of cast ("control" & string(mode))
cursor (500 + mode)
updateStage
end if
on keyStrokeX
set kk = the keyCode
if (the commandDown) and (kk = 12) then
quit
end if
on optionButton
global mode, playFrom, currentGems, atOr, at28a, at56a, at74a, onOr
if mode = 10 then exit
set x0 = the left of sprite 24 + 4
set xT = integer((the mouseH - x0) / 43)
if (xT = 0) and (onOr = 1) then
repeat with x = 19 to 24
puppetSprite x, false
set the immediate of sprite x to false
end repeat
sound stop 1
sound stop 2
set atOr = 1
set the textFont of field "scoreRap" to "ercolano"
killLocal
cursor 4
OrSend
cursor 505
else if (xT = 0) and (onOr = 0) then
beep
else if xT = 1 then
repeat with x = 19 to 24
puppetSprite x, false
set the immediate of sprite x to false
end repeat
sound stop 1
sound stop 2
killLocal
set playFrom to the frame
go "info"
unload
else if xT = 2 then
repeat with x = 19 to 24
puppetSprite x, false
set the immediate of sprite x to false
end repeat
sound stop 1
sound stop 2
killLocal
set playFrom to the frame
if at28a <> 0 then
go "map28a"
else if at56a <> 0 then
go "map56a"
else if at74a <> 0 then
go "map74a"
else
go "map"
unload
end if
else if xT = 3 then
set playFrom to the frame
set the castNum of sprite 19 to the number of cast "setScreen"
set the castNum of sprite 20 to the number of cast "saveButton"
set the castNum of sprite 21 to the number of cast "loadButton"
set the castNum of sprite 22 to the number of cast "quitButton"
set the castNum of sprite 23 to the number of cast "slider"
SetVolSlider
updateStage
set mode = 10
cursor 0
updateStage
pause
else if xT = 4 then
repeat with x = 19 to 24
puppetSprite x, false
set the immediate of sprite x to false
end repeat
sound stop 1
sound stop 2
set the textFont of field "scoreRap" to "ercolano"
killLocal
set playFrom to the frame
go "help"
unload
else if xT = 5 then
set mode = 0
set the castNum of sprite 24 to the number of cast "control0"
cursor 500
updateStage
end if
on goOr theFrame
global playFrom
set playFrom to the frame
go theFrame
on playTo
global mode, playFrom, atOr, altglobal
set atOr = 0
set mode = 0
if altglobal = 1 then
setglobalall1
setlocal1
else if altglobal = 2 then
setglobalall2
setlocal2
else
setglobalall
setlocal
end if
go value(playFrom)
unload
on goTo
global altglobal, saveFrame
if altglobal = 1 then
setglobalall1
setlocal1
else if altglobal = 2 then
setglobalall2
setlocal2
else
setglobalall
setlocal
end if
repeat while the soundbusy of 2
end repeat
sound stop 2
go value(saveFrame)
on DragSlider
put 178 into vOffset
put 120 into top
put 230 into bottom
put integer((bottom - top) / 8) into interval
repeat while the stillDown
if (the mouseV >= top) AND (the mouseV <= bottom) then
set the locV of sprite 23 = (the mouseV + vOffset)
updateStage
end if
end repeat
set the soundLevel to value(GetVolSetting(top,bottom,interval,(the locV of sprite 23 - vOffset)))
SetVolSlider
doSound "00SetUp"
updateStage
on SetVolSlider
put 178 into vOffset
put 120 into top
put 230 into bottom
put integer((bottom - top) / 8) into interval
put the soundLevel into howLoud
set the locV of sprite 23 = integer((bottom + vOffSet) - (howLoud * interval) - (.5 * interval))
updateStage
on GetVolSetting max,min,levels,currentLoc
if (currentLoc >= max) AND (currentLoc <= (max + levels)) then
return 7
else if (currentLoc >= (max + levels)) AND (currentLoc <= (max + (2 * levels))) then
return 6
else if (currentLoc >= (max + (2 * levels))) AND (currentLoc <= (max + (3 * levels))) then
return 5
else if (currentLoc >= (max + (3 * levels))) AND (currentLoc <= (max + (4 * levels))) then
return 4
else if (currentLoc >= (max + (4 * levels))) AND (currentLoc <= (max + (5 * levels))) then
return 3
else if (currentLoc >= (max + (4 * levels))) AND (currentLoc <= (max + (6 * levels))) then
return 2
else if (currentLoc >= (max + (6 * levels))) AND (currentLoc <= (max + (7 * levels))) then
return 1
else if (currentLoc >= (max + (7 * levels))) AND (currentLoc <= (min)) then
return 0
end if
on killScreenOver
global mode, altglobal, playFrom
set the castNum of sprite 19 to the number of cast "placeHolder"
set the castNum of sprite 20 to the number of cast "placeHolder"
set the castNum of sprite 21 to the number of cast "placeHolder"
set the castNum of sprite 22 to the number of cast "placeHolder"
set the castNum of sprite 23 to the number of cast "placeHolder"
set the locV of sprite 23 = 409
updateStage
if mode < 5 or mode = 10 then
set mode = 0
if altglobal = 1 then
set the castNum of sprite 24 to the number of cast "control10"
else if altglobal = 2 then
set the castNum of sprite 24 to the number of cast "control20"
else
set the castNum of sprite 24 to the number of cast "control0"
end if
cursor 500
continue
go value(playFrom)
else
continue
sound stop 1
end if
on DoQuitRoutine
global mode, playFrom
if mode = 5 then
set the castNum of sprite 19 to the number of cast "quitScreen"
set the castNum of sprite 20 to 0
set the castNum of sprite 21 to the number of cast "yesButton"
set the castNum of sprite 22 to the number of cast "noButton"
set the castNum of sprite 23 to 0
updateStage
cursor 0
updateStage
pause
else
sound stop 1
set playFrom to the frame
set the castNum of sprite 19 to the number of cast "quitScreen"
set the castNum of sprite 20 to 0
set the castNum of sprite 21 to the number of cast "yesButton"
set the castNum of sprite 22 to the number of cast "noButton"
set the castNum of sprite 23 to 0
updateStage
cursor 0
updateStage
pause
end if
on showInventory
global invList, invBanksAll, invWind, inv1, inv2, inv3, inv4
if the number of items of invList <= 4 then
set the castNum of sprite 19 to the number of cast "inventory0"
else
set the castNum of sprite 19 to the number of cast "inventory1"
end if
set the castNum of sprite 20 to the number of cast inv1
set the castNum of sprite 21 to the number of cast inv2
set the castNum of sprite 22 to the number of cast inv3
set the castNum of sprite 23 to the number of cast inv4
set invWind = 1
on killInventory
global invWind, invBank
repeat with x = 19 to 23
set the castNum of sprite x to the number of cast "placeHolder"
end repeat
updateStage
set invWind = 0
set invBank = 1
updateInventory
on inventoryButton
global invList, invBank, invBanksAll
set xiv = the number of items of invList
set xL = the left of sprite the clickOn
if the mouseH - xL > 203 then
set xH = 27
set xT = the top of sprite the clickOn
if the mouseV - xT < xH then
set invBank = invBank - 1
if invBank < 1 then
set invBank = 1
end if
else
set invBank = invBank + 1
if invBank > invBanksAll then
set invBank = invBanksAll
end if
end if
if xiv <= 4 then
set the castNum of sprite 19 to the number of cast "inventory0"
else if invBank = 1 and xiv > 4 then
set the castNum of sprite 19 to the number of cast "inventory1"
else if invBank > 1 and invBanksAll > invBank then
set the castNum of sprite 19 to the number of cast "inventory2"
else if invBanksAll = invBank then
set the castNum of sprite 19 to the number of cast "inventory3"
end if
end if
updateInventory
updateStage
on updateInventory
global invList, invBank, invBanksAll, inv1, inv2, inv3, inv4, invWind
set xi = the number of items of invList
set xv = ((invBank * 4) - 3)
if xi mod 4 = 0 then
set invBanksAll = xi / 4
else
set invBanksAll = (xi / 4) + 1
end if
if invList <> empty then
set inv1 = item xv of invList
if item (xv + 1) of invList <> empty then
set inv2 = item (xv + 1) of invList
else
set inv2 = "iBlank"
end if
if item (xv + 2) of invList <> empty then
set inv3 = item (xv + 2) of invList
else
set inv3 = "iBlank"
end if
if item (xv + 3) of invList <> empty then
set inv4 = item (xv + 3) of invList
else
set inv4 = "iBlank"
end if
if invWind = 1 then
set the castNum of sprite 20 to the number of cast inv1
set the castNum of sprite 21 to the number of cast inv2
set the castNum of sprite 22 to the number of cast inv3
set the castNum of sprite 23 to the number of cast inv4
end if
end if
on addInventory whatInventory
global invList, invBank
if invList contains whatInventory then
-- nothing
else
put whatInventory into item (the number of items of invList + 1) of invList
doSound "grabInventory"
set invBank = 1
updateInventory
end if
on removeInventory whatInventory,calcGemFlag
global mode, invList, invBank, altglobal, invcurrent
if invList contains whatInventory then
repeat with x = 1 to the number of items of invList
if item x of invList = whatInventory then
delete item x of invList
if calcGemFlag <> 1 then
doSound "grabInventory"
end if
set invBank = 1
updateInventory
exit repeat
end if
end repeat
set mode = 0
if altglobal = 1 then
set the castNum of sprite 24 to the number of cast "control10"
else if altglobal = 2 then
set the castNum of sprite 24 to the number of cast "control20"
else
set the castNum of sprite 24 to the number of cast "control0"
end if
cursor 500
end if
on doInventory module
global invCurrent
set xm = char 1 to 3 of the movie
if module contains xm then
set clickit = the clickOn
cursor (the castNum of sprite clickit)
set invCurrent = the name of cast (the castNum of sprite clickit)
killInventory
else
set invCurrent = EMPTY
badInventory
cursor 504
end if
on badInventory
global Bri
if Bri = 0 then
set Bri = 1
doSound "invSnd1"
updateStage
else if Bri = 1 then
set Bri = 2
doSound "invSnd2"
updateStage
else if Bri = 2 then
set Bri = 3
doSound "invSnd3"
updateStage
else if Bri = 3 then
set Bri = 4
doSound "invSnd4"
updateStage
else if Bri = 4 then
set Bri = 5
doSound "invSnd5"
updateStage
else if Bri = 5 then
set Bri = 6
doSound "invSnd2"
updateStage
else if Bri = 6 then
set Bri = 7
doSound "invSnd1"
updateStage
else if Bri = 7 then
set Bri = 8
doSound "invSnd3"
updateStage
else if Bri = 8 then
set Bri = 9
doSound "invSnd5"
updateStage
else if Bri = 9 then
set Bri = 0
doSound "invSnd4"
updateStage
end if
end if
on calcGems howMany
global currentGems, invList, invBank
set currentGems = integer(currentGems + howMany)
removeInventory "iG",1
repeat with g = 1 to 3
removeInventory string("iG"&g),1
end repeat
if currentGems <= 0 then
set currentGems = 0
else if (currentGems >= 1) AND (currentGems <= 3) then
put string("iG"¤tGems) into item (the number of items of invList + 1) of invList
else if (currentGems >= 4) then
put "iG" into item (the number of items of invList + 1) of invList
end if
doSound "gemPing"
set invBank = 1
updateInventory
on calcScore howMany
global currentScore, hintCount
doSound "score"
set currentScore = integer(currentScore + howMany)
if currentScore <= 0 then
set currentScore = 0
end if
set the text of cast "scoreRap" to string(currentScore)
set hintCount = integer(hintCount + 1)
on calcScore2 howMany
global currentScore
doSound "bonus"
set currentScore = integer(currentScore + howMany)
set the text of cast "scoreRap" to string(currentScore)
on jumpTo theFrame
global jumpFrame
set tF = the frame
put tF into item (the number of items of jumpFrame + 1) of jumpFrame
go frame theFrame
on jumpBack
global jumpFrame
put value (item (the number of items of jumpFrame) of jumpFrame) into tF
go frame tF
delete item (the number of items of jumpFrame) of jumpFrame
on doSound x
set z = the pathname & "wrath audio:" & x
sound playFile 2, z
on checkSound
if the soundBusy of 2 then go the frame
on lookItem theRap
set the text of cast "lookRap" to theRap
set the textFont of field "lookRap" to "ercolano"
set the type of sprite 19 to 16
set the ink of sprite 19 to 36
set the castNum of sprite 19 to the number of cast "lookRap"
updateStage
set tt = the ticks
repeat while tt + 90 > the ticks
nothing
end repeat
set the castNum of sprite 19 to the number of cast "placeHolder"
updateStage
on memDump fromFrame, toFrame
global mode
cursor 4
unLoad
preLoad fromFrame, toFrame
cursor (500 + mode)
on WaitForQT channelNumber
if the movieTime of sprite value(channelNumber) < the duration of cast ¼
string(the name of cast value(the castNum of sprite value(channelNumber))) then